package net.aynt.core.exception;

import net.aynt.core.mvc.View;

public class NotFoundTemplateException extends RuntimeException {

	/** 描述  */
	private static final long serialVersionUID = 4297542590778361854L;

	/**  
	 *   
	 */ 
	public NotFoundTemplateException() {
		super();
	}

	/**  
	 * @param message
	 * @param cause  
	 */ 
	public NotFoundTemplateException(String message, Throwable cause) {
		super(message, cause);
	}

	/**  
	 * @param message  
	 */ 
	public NotFoundTemplateException(String message) {
		super(message);
	}

	/**  
	 * @param cause  
	 */ 
	public NotFoundTemplateException(Throwable cause) {
		super(cause);
	}
	
	/**  
	 * @param cause  
	 */ 
	public static NotFoundTemplateException build(String path, View view) {
		StringBuilder msg = new StringBuilder();
		msg.append("Not found template:" + path + ", ext is");
		msg.append(" " + view.getExt());
		msg.append(".");
		
		return new NotFoundTemplateException(msg.toString());
	}
	
}
